How I can use my : input.type = "number"; to be used only in specific fields?
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
I have these inserts, to insert fields into the table. So how can I specify only for the eg. Cell(0)? To have only numbers (0-9) in the specific fields.
Sorry if sounds stupid. Thank you
Currently you only create a cell. To add a input field you simply create one (as shown below) and append it to your cell like this:
const input = document.createElement('input');
input.setAttribute('type', 'number');
input.setAttribute('min', 0);
input.setAttribute('max', 9);
cell1.appendChild(input)
Some resources for you to learn about all this:
I hope this helps ;)